#include"stdio.h"

int even(unsigned x)
{  
    x^=x>>16;
    x^=x>>8;
    x^=x>>4;
    x^=x>>2;
    x^=x>>1;
    return !(x&1);
}

void main()
{
     unsigned n;
     printf("please input a number:\n");
     scanf("%d",&n);
     if(even(n))
     printf("有偶数个1\n");
     else
     printf("有奇数个1\n");
     
}
     
